The present invention relates to an emulation method, and in particular, to a method for emulating programs in a system comprising a plurality of data processors which operate with different instruction word sets.
In an ordinary data processor, a group of programs, that is, instruction words intrinsic to the data processor is provided, and the function of each instruction word is defined by an operation code specified in a predetermined field of the instruction word.
On the other hand, there arises a problem when an existing data processor of the old type is replaced with a new model in that the programs running on the old-type data processor must be adapted to the new model. If the source programs of these programs are constructed with a high level language, they can be utilized as the object programs on the new data processor (to be referred to as a native machine hereafter) by recompiling the source programs at system conversion. Actually, however, the complete compatibility cannot be implemented between these data processors in many cases because of the discrepancy existing between the language specifications of the respective data processors. As a result, program modification is necessary and thus the necessary volume of human work will be increased, for example, for the test run to be conducted after the program compilation. Consequently, an emulation is necessary if a program running on an old-type data processor (to be referred to as a target machine hereafter) is to be executed on a native machine without modifying the program even when there does not exist a compatibility in architecture between these target and native machines, or if a program which runs on a virtual computer having the different architecture is to be executed on an existing data processor. In the emulation, functions of the native machine are expanded or modified by use of microprogramming, thereby realizing a high-speed execution of a program used in a data processor having the different architecture.
To conduct an emulation, the emulation of input/output instructions will become an essential factor. For example, when a program running on a data processor having an input/output instruction set not designed for a channel configuration is to be emulated on a data processor having an input/output instruction set designed for a channel configuration, it will be difficult to conduct the emulation only by use of microprograms because of a considerable difference between the hardware systems of these data processors.
In general, such a data processor having the input/output instruction set of other than the channel type must issue a plurality of input/output instructions to perform an input/output operation. In contrast to this data processor, a data processor having an input/output instruction set of the channel type issues only an input/output initiate (SIO) instruction to carry out an input/output operation.
For example, when a seek operation and a read operation are to be conducted on a magnetic disk unit, an SIO instruction is issued for the channel if the channel-type input/output instruction set is utilized, provided that the seek and read operations have been specified with a channel command word (CCW) by use of a command chain. On the other hand, with the input/output instruction set of other than the channel type, the parameters necessary for the seek and read operations are sequentially written in a group of the pertinent input/output control registers disposed in the disk control unit and the input/output operation is initiated. In a data processing system having an input/output instruction set not designed for a channel configuration as explained above, a plurality of input/output instructions are required to be issued to execute the seek and read operations.
Therefore, if a native machine having the channel-type input/output instruction set is used to emulate an input/output instruction of other than the channel type, an interface program is initiated each time a write input/output (WIO)- instruction is issued for performing an interpreting processing for the WIO instruction, and a set of WIO instructions are replaced with an input/output macro instruction of the channel type or one for the new operating system.
It will be apparent that the software overhead required for the interpreting processing of WIO instructions increases in this situation. Like batch processing, if a high-speed operation is not required for a program which performs an emulation, the method described above will not lead to any serious problems. However, like a program in an online system, if a rapid response is necessary for an emulation program and if such input/output operations are carried out frequently, this method cannot be regarded as preferable with respect to the performance.